{% load blog_tags %}
{% load static %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
{#<link href="{% static "css/blog.css" %}" rel="stylesheet" />#}
</head>
<body>
<div id="content">
    {% block content %}
    {% endblock %}
</div>
<div id="siderbar">
    <h2>逐浪内容管理系统</h2>
    <p>逐浪CMS发哥的博客列表，已经创作了{% total_posts %}篇日志。</p>
<p><a href="{% url "blog:post_feed" %}">点此获取RSS阅读列表</a></p>
    <h3>最近更新：</h3>
{#    显示三条最近更新#}
    {% show_latest_posts 3 %}
{#    最近被评论的#}
    <h3>最近评论的帖子</h3>
    {% get_most_commented_posts as most_commented_posts %}
    <ul>
        {% for post in most_commented_posts %}
        <li>
            <a href="{{ post.get_absolute_url }}">{{ post.title }}</a>
        </li>
        {% endfor %}
    </ul>
</div>
</body>
</html>